xen.git
19 years ago[XEND] Add missing line from changeset 11653:3b7e11cbeb940
kfraser@localhost.localdomain [Tue, 10 Oct 2006 15:02:30 +0000 (16:02 +0100)]
[XEND] Add missing line from changeset 11653:3b7e11cbeb940
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[XEND] Re-add the tap prefix because it is needed.
Alastair Tse [Fri, 13 Oct 2006 17:36:25 +0000 (18:36 +0100)]
[XEND] Re-add the tap prefix because it is needed.

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XENAPI] Make vm-destroy consistent with API naming. Moved what is
Alastair Tse [Fri, 13 Oct 2006 16:34:13 +0000 (17:34 +0100)]
[XENAPI] Make vm-destroy consistent with API naming. Moved what is
known as xm destroy to vm-shutdown --force.

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Remove extra tap: prefix for device uname.
Alastair Tse [Fri, 13 Oct 2006 16:33:34 +0000 (17:33 +0100)]
[XEND] Remove extra tap: prefix for device uname.

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Fix bugs in vbd_create logic when handling VDIs
Alastair Tse [Fri, 13 Oct 2006 16:17:45 +0000 (17:17 +0100)]
[XEND] Fix bugs in vbd_create logic when handling VDIs

Attempt to handle 'tap' devices as 'vbd' devices even though the
internal configuration has no idea that 'tap' is a subclass of 'vbd'.

Add option parsing to vbd-create and vdi-create so you can override
the configuration file options.

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Fix some bad names left behind while converting all storage to
Alastair Tse [Fri, 13 Oct 2006 14:38:13 +0000 (15:38 +0100)]
[XEND] Fix some bad names left behind while converting all storage to
bytes rather than KB.

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] XendVDI saves configuration on change.
Alastair Tse [Fri, 13 Oct 2006 14:34:01 +0000 (15:34 +0100)]
[XEND] XendVDI saves configuration on change.

Added a base class called AutoSaveObject that will attempt to call
save_config() if any attribute in the object changes. It isn't
particularly efficient, but we do not expect VDI to change much.

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Updates to SR and VDI implementations
Alastair Tse [Fri, 13 Oct 2006 14:13:21 +0000 (15:13 +0100)]
[XEND] Updates to SR and VDI implementations

* Moved xenapi transport util method, stringify to xen.util.xmlrpclib2
* XenVDI now preserves configuration to an XML-ish file
* Update Xen API's class names to be all lowercase
* Update get_by_label to get_by_name_label and return sets as the API
  expects.
* Add support for VBD creation with a VDI reference.

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Adding API stub generation to XendAPI + SR implementation for
Alastair Tse [Thu, 12 Oct 2006 17:51:17 +0000 (18:51 +0100)]
[XEND] Adding API stub generation to XendAPI + SR implementation for
Xen API.

Fixed *get_by_label functions to return a Set rather than only one
result.

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Beginnings of the Xend Storage Repository implementation.
Alastair Tse [Thu, 12 Oct 2006 17:01:32 +0000 (18:01 +0100)]
[XEND] Beginnings of the Xend Storage Repository implementation.

Currently it is a basic repository that just creates images on demand
and wraps them as VDIs. Rudimentary support for querying the available
space using 'df'. Creates images via 'qcow-create' after creating an
empty image.

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Removing this file from version control as it is now
Alastair Tse [Thu, 12 Oct 2006 17:00:01 +0000 (18:00 +0100)]
[XEND] Removing this file from version control as it is now
autogenerated via the distutils build script.

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Fix interpretation of stringified 64 bit ints in
Alastair Tse [Thu, 12 Oct 2006 11:30:01 +0000 (12:30 +0100)]
[XEND] Fix interpretation of stringified 64 bit ints in
XendConfig. Rename Xen API classes, "Host" and "Host_CPU" to their
lowercase equivalent.

Apparent confusion in the docs as to what they should be named.

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Add some sort of rudimentary version embedding into the source
Alastair Tse [Thu, 12 Oct 2006 11:27:56 +0000 (12:27 +0100)]
[XEND] Add some sort of rudimentary version embedding into the source
so we can report the Xend version number as opposed to Xen's version
number.

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years agoGive our test VM a name with no space (Xend does not allow this at the moment).
ewan@linford.intra [Sat, 7 Oct 2006 17:22:48 +0000 (18:22 +0100)]
Give our test VM a name with no space (Xend does not allow this at the moment).

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoImport libxen-src-0.4.3-2.tar.bz2.
ewan@linford.intra [Sat, 7 Oct 2006 17:22:09 +0000 (18:22 +0100)]
Import libxen-src-0.4.3-2.tar.bz2.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years ago[XEND] Conform to Xen API XMLRPC Wire Protocol Customisation
Alastair Tse [Fri, 6 Oct 2006 21:50:29 +0000 (22:50 +0100)]
[XEND] Conform to Xen API XMLRPC Wire Protocol Customisation

1. Int(s) all have to be String(s).
2. Enums are not transmitted as Ints, but as Descriptive Strings.

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XENAPI] Adding some rudimentary documentation about what has changed.
Alastair Tse [Fri, 6 Oct 2006 17:01:08 +0000 (18:01 +0100)]
[XENAPI] Adding some rudimentary documentation about what has changed.

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Save device updates to VM configuration via Xen API
Alastair Tse [Fri, 6 Oct 2006 16:34:49 +0000 (17:34 +0100)]
[XEND] Save device updates to VM configuration via Xen API

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Fix check for whether domain is running.
Alastair Tse [Fri, 6 Oct 2006 15:40:39 +0000 (16:40 +0100)]
[XEND] Fix check for whether domain is running.

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XENAPI] Support for VBD/VIF info listing in vm-list --long
Alastair Tse [Fri, 6 Oct 2006 15:30:35 +0000 (16:30 +0100)]
[XENAPI] Support for VBD/VIF info listing in vm-list --long

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Proper support for devices with UUID. Removing old workaround
Alastair Tse [Fri, 6 Oct 2006 15:27:06 +0000 (16:27 +0100)]
[XEND] Proper support for devices with UUID. Removing old workaround
with augmented VM UUIDs with devids.

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XENAPI] Add missing function names. Proper sub command help messages.
Alastair Tse [Fri, 6 Oct 2006 11:46:46 +0000 (12:46 +0100)]
[XENAPI] Add missing function names. Proper sub command help messages.

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XENAPI] Pretty print error messages, insert simple argument parsing
Alastair Tse [Fri, 6 Oct 2006 11:31:24 +0000 (12:31 +0100)]
[XENAPI] Pretty print error messages, insert simple argument parsing
framework

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Keep track of attached vbds and vifs for XenAPI
Alastair Tse [Fri, 6 Oct 2006 11:30:46 +0000 (12:30 +0100)]
[XEND] Keep track of attached vbds and vifs for XenAPI

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XENAPI] Fix wrong vars being extracted from reading python cfg
Alastair Tse [Fri, 6 Oct 2006 11:02:29 +0000 (12:02 +0100)]
[XENAPI] Fix wrong vars being extracted from reading python cfg

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XENAPI] Added hard shutdown (aka. vm-destroy)
Alastair Tse [Fri, 6 Oct 2006 10:57:16 +0000 (11:57 +0100)]
[XENAPI] Added hard shutdown (aka. vm-destroy)

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Remove annoying debugging messages
Alastair Tse [Fri, 6 Oct 2006 10:56:36 +0000 (11:56 +0100)]
[XEND] Remove annoying debugging messages

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XENAPI] Example tools to create/destroy/shutdown VMs
Alastair Tse [Fri, 6 Oct 2006 10:48:21 +0000 (11:48 +0100)]
[XENAPI] Example tools to create/destroy/shutdown VMs

Example Session:

xapi.py vm-list
xapi.py host-info
xapi.py vm-create xapi.domcfg.py
xapi.py vbd-create GentooAPI xapi.vbdcfg.py
xapi.py vif-create GentooAPI xapi.vifcfg.py
xapi.py vm-start GentooAPI
xapi.py vm-shutdown GentooAPI
xapi.py vm-delete xapi.py

signed-off-by: Alastair Tse <atse@xensource.com>

19 years ago[XEND] Fix shutdown reasons from Xen API
Alastair Tse [Thu, 5 Oct 2006 19:03:16 +0000 (20:03 +0100)]
[XEND] Fix shutdown reasons from Xen API

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Another attempt at fixing escaping logic in SXP
Alastair Tse [Thu, 5 Oct 2006 19:02:50 +0000 (20:02 +0100)]
[XEND] Another attempt at fixing escaping logic in SXP

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Fix XenAPI Host interface so that get_record works.
Alastair Tse [Thu, 5 Oct 2006 18:13:52 +0000 (19:13 +0100)]
[XEND] Fix XenAPI Host interface so that get_record works.

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Fix many typos with VM interface to XenAPI
Alastair Tse [Thu, 5 Oct 2006 17:48:54 +0000 (18:48 +0100)]
[XEND] Fix many typos with VM interface to XenAPI

1. Python XMLRPC does not allow integer keys to structs.
2. Typo with on_suspend and on_preserve
3. Changed all tuples in constants to lists so .index() works.
4. Made get_vcpus_utils to return seconds of CPU time.
5. Fix flawed login in VM.get_record()

19 years ago[XEND][XM] Fix bug in XendDomainInfo.recreate introduced by refactoring.
Alastair Tse [Thu, 5 Oct 2006 17:24:18 +0000 (18:24 +0100)]
[XEND][XM] Fix bug in XendDomainInfo.recreate introduced by refactoring.

* Replaced autostart and autostop with more descriptive on_xend_start
  and on_xend_stop for the configuration.

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XM] Add missing parameter to XM XMLRPC call so that we get the
Alastair Tse [Thu, 5 Oct 2006 17:22:13 +0000 (18:22 +0100)]
[XM] Add missing parameter to XM XMLRPC call so that we get the
devices in xm list --long

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Comments cleanups
Alastair Tse [Thu, 5 Oct 2006 16:29:20 +0000 (17:29 +0100)]
[XEND] Comments cleanups

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Remove misleading debugging message
Alastair Tse [Thu, 5 Oct 2006 16:29:20 +0000 (17:29 +0100)]
[XEND] Remove misleading debugging message

http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=732

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XM][XEND] Speed up xm list
Alastair Tse [Thu, 5 Oct 2006 16:29:20 +0000 (17:29 +0100)]
[XM][XEND] Speed up xm list

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Exposing the XendAPI module in the XMLRPCServer
Alastair Tse [Thu, 5 Oct 2006 16:29:19 +0000 (17:29 +0100)]
[XEND] Exposing the XendAPI module in the XMLRPCServer

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XM] new.py that implements adding an unstarted domain
acnt2@huggins.lce.cl.cam.ac.uk [Thu, 5 Oct 2006 16:29:19 +0000 (17:29 +0100)]
[XM] new.py that implements adding an unstarted domain

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XM] Add commands to implement lifecycle commands via the XM XMLRPC interface.
Alastair Tse [Thu, 5 Oct 2006 16:29:19 +0000 (17:29 +0100)]
[XM] Add commands to implement lifecycle commands via the XM XMLRPC interface.

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Make SXP be compatible with sequencetypes (Tuples and Lists)
Alastair Tse [Thu, 5 Oct 2006 16:29:19 +0000 (17:29 +0100)]
[XEND] Make SXP be compatible with sequencetypes (Tuples and Lists)

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND][XENAPI] XendNode implementation for Xen API Host, Host CPUs
Alastair Tse [Thu, 5 Oct 2006 16:29:19 +0000 (17:29 +0100)]
[XEND][XENAPI] XendNode implementation for Xen API Host, Host CPUs

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Add a convenience function for UUID generation
Alastair Tse [Thu, 5 Oct 2006 16:29:19 +0000 (17:29 +0100)]
[XEND] Add a convenience function for UUID generation

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND][XENAPI] XendCheckpoint should use XendConfig for passing configs.
Alastair Tse [Thu, 5 Oct 2006 16:29:19 +0000 (17:29 +0100)]
[XEND][XENAPI] XendCheckpoint should use XendConfig for passing configs.

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Implementation of Xen-API in a separate module.
Alastair Tse [Thu, 5 Oct 2006 16:29:19 +0000 (17:29 +0100)]
[XEND] Implementation of Xen-API in a separate module.

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Change blkif to use the new style configuration
Alastair Tse [Thu, 5 Oct 2006 16:29:19 +0000 (17:29 +0100)]
[XEND] Change blkif to use the new style configuration

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Massive XendDomain XendDomainInfo reorganisation to use XendConfig.
Alastair Tse [Thu, 5 Oct 2006 16:29:19 +0000 (17:29 +0100)]
[XEND] Massive XendDomain XendDomainInfo reorganisation to use XendConfig.

* Added some constants to do with lifecycle management in XendDomain
* Added docstrings
* Made all private functions prefixed with an underscore (_)
* Added lifecycle management in XendDomain which stores configs in SXP
  format.
* Added bits of XenAPI support.
* Moved all XendDomainInfo constants to a separate file
* Moved most of the domain creation login into XendDomainInfo rather
  than in module level functions.
* Moved to use Xen API compatible reporting of state.
* Reorganised methods into logical groups in XendDomain and XendDomainInfo
* Moved all domain configuration validation into XendConfig
* Removed DevController cruft from the bottom of XendDomainInfo to
  XendDevices.

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] XendConfig is an extended python dictionary that is used to exchange
Alastair Tse [Thu, 5 Oct 2006 16:29:19 +0000 (17:29 +0100)]
[XEND] XendConfig is an extended python dictionary that is used to exchange
VM configuration information to allow easy import and export to different
file types.

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Refactoring device controllers to its own module so it can be used by both...
Alastair Tse [Thu, 5 Oct 2006 16:29:19 +0000 (17:29 +0100)]
[XEND] Refactoring device controllers to its own module so it can be used by both XendConfig and XendDomainInfo.

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND][XENAPI] Split Xend global constants out to its own file.
Alastair Tse [Thu, 5 Oct 2006 16:29:19 +0000 (17:29 +0100)]
[XEND][XENAPI] Split Xend global constants out to its own file.

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND][XENAPI] Adding some default Xen API Errors
Alastair Tse [Thu, 5 Oct 2006 16:29:19 +0000 (17:29 +0100)]
[XEND][XENAPI] Adding some default Xen API Errors

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Minor code formatting changes to XendRoot.py
acnt2@huggins.lce.cl.cam.ac.uk [Thu, 5 Oct 2006 16:29:19 +0000 (17:29 +0100)]
[XEND] Minor code formatting changes to XendRoot.py

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND][LIFECYCLE] Configurable storage path for lifecycle support
acnt2@huggins.lce.cl.cam.ac.uk [Thu, 5 Oct 2006 16:29:19 +0000 (17:29 +0100)]
[XEND][LIFECYCLE] Configurable storage path for lifecycle support

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Clean up some keyword clashes with XendCheckpoint
acnt2@huggins.lce.cl.cam.ac.uk [Thu, 5 Oct 2006 16:29:19 +0000 (17:29 +0100)]
[XEND] Clean up some keyword clashes with XendCheckpoint
- Replaced str with domstr
- Disabled changing domain name while migrating

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Xen API Auth Manager for handling sessions
acnt2@huggins.lce.cl.cam.ac.uk [Thu, 5 Oct 2006 16:29:19 +0000 (17:29 +0100)]
[XEND] Xen API Auth Manager for handling sessions

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Make XMLRPC Server shutdown cleanly.
Alastair Tse [Thu, 5 Oct 2006 16:29:19 +0000 (17:29 +0100)]
[XEND] Make XMLRPC Server shutdown cleanly.

We can now catch the end of Xend and clean up domains accordingly.

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Make logging an optional parameter for the XMLRPCServer
Alastair Tse [Thu, 5 Oct 2006 16:29:19 +0000 (17:29 +0100)]
[XEND] Make logging an optional parameter for the XMLRPCServer

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Replace dom with domid.
acnt2@huggins.lce.cl.cam.ac.uk [Thu, 5 Oct 2006 16:29:19 +0000 (17:29 +0100)]
[XEND] Replace dom with domid.

* Also removed stray semicolon
* Fixed whitespace for pciif.py
* Moved DEV_MIGRATE_TEST to xen.xend.__init__.py

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Python API break. Replacing ambiguious 'dom' with 'domid'
acnt2@huggins.lce.cl.cam.ac.uk [Thu, 5 Oct 2006 16:29:19 +0000 (17:29 +0100)]
[XEND] Python API break. Replacing ambiguious 'dom' with 'domid'

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Minor stylistic fixes for XendBootloader.py
acnt2@huggins.lce.cl.cam.ac.uk [Thu, 5 Oct 2006 16:29:19 +0000 (17:29 +0100)]
[XEND] Minor stylistic fixes for XendBootloader.py

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Make import sxp into absolute import.
acnt2@huggins.lce.cl.cam.ac.uk [Thu, 5 Oct 2006 16:29:19 +0000 (17:29 +0100)]
[XEND] Make import sxp into absolute import.
* Replacing import sxp with from xen.xend import sxp to avoid
confusion.

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Fix backslash escaping so it ignores escapes if they don't make sense.
acnt2@huggins.lce.cl.cam.ac.uk [Thu, 5 Oct 2006 16:29:19 +0000 (17:29 +0100)]
[XEND] Fix backslash escaping so it ignores escapes if they don't make sense.

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEN][HVM] Fix a bug which could lead to the guest locking up if it
Steven Smith [Mon, 2 Oct 2006 12:45:44 +0000 (13:45 +0100)]
[XEN][HVM] Fix a bug which could lead to the guest locking up if it
tried to a backwards memcpy across a page boundary in an MMIO region.
This should fix the problems some people have been reporting running
vim.

Signed-off-by: Steven Smith <sos22@cam.ac.uk>
19 years ago[HVM][TOOLS] Improve warnign message when trying to create
kaf24@firebug.cl.cam.ac.uk [Sat, 30 Sep 2006 10:35:02 +0000 (11:35 +0100)]
[HVM][TOOLS] Improve warnign message when trying to create
an HVM guest on a non-capable platform.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[HVM] Mov to/from CR8 must be gated on whether VLAPIC device is created.
kaf24@firebug.cl.cam.ac.uk [Sat, 30 Sep 2006 10:30:09 +0000 (11:30 +0100)]
[HVM] Mov to/from CR8 must be gated on whether VLAPIC device is created.

If APIC=0 in VMX configuration file, VLAPIC(v) in
mov_from_cr()/mov_to_cr() will be NULL, so calling
vlapic_get_reg()/vlapic_set_reg()/vlapic_update_ppr()
would crash Xen.

Original patch from Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[HVM] Add RDMSR/WRMSR instruction emulation to VMXAssist decoder
kaf24@firebug.cl.cam.ac.uk [Sat, 30 Sep 2006 10:11:54 +0000 (11:11 +0100)]
[HVM] Add RDMSR/WRMSR instruction emulation to VMXAssist decoder
AP of PAE SMP windows will use it to set NX bit in EFER.

Signed-off-by: Xin Li <xin.b.li@intel.com>
19 years ago[HVM] Add sub instruction support to HVM MMIO decoder.
kaf24@firebug.cl.cam.ac.uk [Sat, 30 Sep 2006 10:08:41 +0000 (11:08 +0100)]
[HVM] Add sub instruction support to HVM MMIO decoder.
This is needed for SMP PAE windows XP SP2.

Signed-off-by: Xin Li <xin.b.li@intel.com>
19 years ago[HVM][SVM] Do not delay ExtInt event injection if RFLAGS.IF==0.
kaf24@firebug.cl.cam.ac.uk [Sat, 30 Sep 2006 09:49:08 +0000 (10:49 +0100)]
[HVM][SVM] Do not delay ExtInt event injection if RFLAGS.IF==0.

AMD-V does not require the delaying of interrupt injection if the guest
IF_FLAG disallows interrupts.  Remove the code in svm_intr_assist()
that was checking the guest IF in eflags.

This patch fixes the problem with HVM Windows guests, with observing a
very slow timer countdown on the initial boot menu, when there is more
than one boot option.  Kbd response in this same Windows boot menu is
also acceptably responsive with this patch.

Signed-off-by: Tom Woller <thomas.woller@amd.com>=20
19 years ago[NET] back: Loopback must copy foreign mappings.
kfraser@localhost.localdomain [Fri, 29 Sep 2006 18:12:15 +0000 (19:12 +0100)]
[NET] back: Loopback must copy foreign mappings.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoMerge.
Steven Smith [Fri, 29 Sep 2006 14:40:35 +0000 (15:40 +0100)]
Merge.

19 years ago[XEN][HVM] Arrange that we only consider sending a PV-on-HVM event channel
Steven Smith [Fri, 29 Sep 2006 14:40:19 +0000 (15:40 +0100)]
[XEN][HVM] Arrange that we only consider sending a PV-on-HVM event channel
callback interrupt in vcpu 0.  This avoids a race in SMP HVM domains
which could lead to interrupts never getting delivered.  It is safe
because HVM domains always bind their event channels to vcpu 0.

Bug pointed out by Keir.

Signed-off-by: Steven Smith <sos22@cam.ac.uk>
19 years ago[BLKTAP] Find major number by searching sysfs
kfraser@localhost.localdomain [Fri, 29 Sep 2006 13:55:57 +0000 (14:55 +0100)]
[BLKTAP] Find major number by searching sysfs
instead of reading /proc/devices.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
19 years agoMerge.
Steven Smith [Fri, 29 Sep 2006 13:42:49 +0000 (14:42 +0100)]
Merge.

19 years ago[XEN][HVM] Make sure that the interrupt which event channel events come in
Steven Smith [Fri, 29 Sep 2006 13:42:04 +0000 (14:42 +0100)]
[XEN][HVM] Make sure that the interrupt which event channel events come in
on is level triggered rather than edge triggered, since it's a PCI device.
This is complicated by the possibility that another PCI device could be
on the same interrupt; the workaround is to have two irr registers
for the PIC and APIC, and have qemu and Xen generated interrupts go
into different ones.

This broke the alt_irq stuff.  Fortunately, nobody uses that anymore, so
I've removed it.

Signed-off-by: Steven Smith <sos22@cam.ac.uk>
19 years ago[LINUX] Make evtchn device use a dynamic minor number.
kfraser@localhost.localdomain [Fri, 29 Sep 2006 13:20:52 +0000 (14:20 +0100)]
[LINUX] Make evtchn device use a dynamic minor number.

Also update the code in tools to create the device node if udev fails.
The tools now read the sysfs system to find the minor number needed.

Original patch from  Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[XEN] Recompute shadows of PAE PSE l2es when needed.
Tim Deegan [Fri, 29 Sep 2006 10:57:06 +0000 (11:57 +0100)]
[XEN] Recompute shadows of PAE PSE l2es when needed.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
19 years ago[HVM][SVM] Obtaining instruction address needs to mask to 32 bits
kfraser@localhost.localdomain [Fri, 29 Sep 2006 10:50:51 +0000 (11:50 +0100)]
[HVM][SVM] Obtaining instruction address needs to mask to 32 bits
if not running in 64-bit mode.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[TOOLS] Fix xendomains init.d script DOG PIG confusion.
Alastair Tse [Fri, 29 Sep 2006 10:25:25 +0000 (11:25 +0100)]
[TOOLS] Fix xendomains init.d script DOG PIG confusion.

Fix typos in xendomains where we actually mean WDOG_PID.
http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=754

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[HVM] Disable VMX/SVM on auxiliary processors when shutting down an SMP system.
kfraser@localhost.localdomain [Fri, 29 Sep 2006 10:28:04 +0000 (11:28 +0100)]
[HVM] Disable VMX/SVM on auxiliary processors when shutting down an SMP system.

With Intel VT, VMXOFF needs to be executed before halting the
CPU. Without this fix Xen or Linux is unable to start up the CPU after
a kexec reboot.

Tested using x86_32 on a Pentium D 930.

Signed-Off-By: Magnus Damm <magnus@valinux.co.jp>
19 years ago[HVM][VMX] Clear vmxe when VMX is not enabled.
kfraser@localhost.localdomain [Fri, 29 Sep 2006 10:26:33 +0000 (11:26 +0100)]
[HVM][VMX] Clear vmxe when VMX is not enabled.

The current Xen code keeps X86_CR4_VMXE set even if VMXON has not been
executed. The stop_vmx() code assumes that it is possible to call
VMXOFF if X86_CR4_VMXE is set which is not always true. Calling VMXOFF
without VMXON results in an illegal opcode trap, and to avoid this condition
this patch makes sure that X86_CR4_VMXE is only set when VMXON has
been called.

Tested using x86_32 on a Pentium D 930.

Signed-Off-By: Magnus Damm <magnus@valinux.co.jp>
19 years ago[PYGRUB] Enable showing the cursor in pygrub when it's relevant to do so.
kfraser@localhost.localdomain [Fri, 29 Sep 2006 10:22:24 +0000 (11:22 +0100)]
[PYGRUB] Enable showing the cursor in pygrub when it's relevant to do so.
Signed-off-by: Jeremy Katz <katzj@redhat.com>
19 years ago[HVM][SVM] 64-bit Windows HVM guests require MCE/MCA CPUID bits to be present.
kfraser@localhost.localdomain [Fri, 29 Sep 2006 10:21:02 +0000 (11:21 +0100)]
[HVM][SVM] 64-bit Windows HVM guests require MCE/MCA CPUID bits to be present.
This SVM patch removes "masking off" of these bits for AMD-V HVM guests.
Signed-off-by: Tom Woller <thomas.woller@amd.com>=20
19 years ago[BLKTAP] Remove unnecessary TLB flush from blktap driver.
kfraser@localhost.localdomain [Fri, 29 Sep 2006 10:17:29 +0000 (11:17 +0100)]
[BLKTAP] Remove unnecessary TLB flush from blktap driver.

blktap_poll is calling tlb_flush_all() in its main ring buffer polling
loop.  This seems to be superfluous: the hypervisor should be
performing
any necessary tlb flushes on grant table operations performed by the
back-end.  Even a simple memory barrier is unnecessary here as the
RING_PUSH_REQUESTS() call performs a wmb() anyway.

And tlb_flush_all() is not exported to modules, so this call prevents
blktap from building as a module.  Just remove it.

Signed-off-by: Stephen Tweedie <sct@redhat.com>
19 years ago[BLKTAP] Remove unnecessary timeout from tapdisk select() call.
kfraser@localhost.localdomain [Fri, 29 Sep 2006 10:16:52 +0000 (11:16 +0100)]
[BLKTAP] Remove unnecessary timeout from tapdisk select() call.

tapdisk was using a 1msec select() timeout in its main event loop.  On
timeout, the loop does nothing except repeat, so the timeout achieves
nothing; worse, on a machine with HZ set to less than 1000, a msec
timeout returns immediately, sending tapdisk into a 100%-CPU-
utilisation loop.

Simply remove the timeout entirely; everything still works fine, and
much more efficiently when idle.

Signed-off-by: Stephen Tweedie <sct@redhat.com>
19 years agoRemove dead pdb code from tools directory.
kfraser@localhost.localdomain [Fri, 29 Sep 2006 10:13:01 +0000 (11:13 +0100)]
Remove dead pdb code from tools directory.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[VMXASSIST] Fix data32/addr32 instruction decode issue.
kfraser@localhost.localdomain [Fri, 29 Sep 2006 10:11:49 +0000 (11:11 +0100)]
[VMXASSIST] Fix data32/addr32 instruction decode issue.
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
19 years ago[HVM] Clean up hvm_copy interface to be more like copy_to/from_user.
kfraser@localhost.localdomain [Fri, 29 Sep 2006 10:10:14 +0000 (11:10 +0100)]
[HVM] Clean up hvm_copy interface to be more like copy_to/from_user.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[HVM][VMX] Fix data copying in transition to/from vmxassist.
kfraser@localhost.localdomain [Fri, 29 Sep 2006 09:30:18 +0000 (10:30 +0100)]
[HVM][VMX] Fix data copying in transition to/from vmxassist.

In vmx_assist, the copy for new/old context and vmx assist magic are
all using physical address, while hvm_copy will use the virtual address.

This may cause problem when guest jump directly from real mode to
paging mode.

Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[NET] back: Reset netfilter context in loopback receive path.
kfraser@localhost.localdomain [Fri, 29 Sep 2006 08:29:20 +0000 (09:29 +0100)]
[NET] back: Reset netfilter context in loopback receive path.
The issue is described in bugzilla report #746.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[BLK] front: Flush workqueues with no locks held. Operation can sleep.
kfraser@localhost.localdomain [Fri, 29 Sep 2006 08:23:18 +0000 (09:23 +0100)]
[BLK] front: Flush workqueues with no locks held. Operation can sleep.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[XENBUS] Don't perform normal state-machine transitions and
kfraser@localhost.localdomain [Fri, 29 Sep 2006 08:14:28 +0000 (09:14 +0100)]
[XENBUS] Don't perform normal state-machine transitions and
notifications during shutdown. When rootfs goes away this can
cause the system to hang, as we notify userspace etc.
Instead we forcibly reset the state machine back to state Closed
if we are a frontend driver, to get the backend to release
resources. Necessary if we are going to kexec.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[BLKTAP] have udev create the device for blktap
Andrew Warfield [Thu, 28 Sep 2006 20:44:00 +0000 (13:44 -0700)]
[BLKTAP] have udev create the device for blktap
This patch makes blktap Do The Right Thing(TM).  It allows udev to
create the /dev/xen/blktap[0-9] devices.

It creates a sysfs class called "xen".  This part may later be placed
someplace else, but currently blktap is the only user so it is placed in
the blktap code.

When blktap is initialized, a blktap0 sysfs class device is made.  The
other devices blktapX (X > 0) are made when the BLKTAP_IOCTL_NEWINTF
ioctl is called.  This way we don't flood the sysfs and /dev/xen with
unnecessary devices.

I added a rule in the xen-backend.rules to allow for udev to create the
blktap devices.

With this, we can really remove the code to search and create the
/dev/xen/blktap[0-9]*, but I'll leave it in for now. With the use of
udev, we really should remove that code as well as the code for creating
the evtchn device.  udev works for both of these now.  But that removal
will have to be in another patch.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
19 years ago[BLKTAP] have blktap use a dynamic major
Andrew Warfield [Thu, 28 Sep 2006 19:47:45 +0000 (12:47 -0700)]
[BLKTAP] have blktap use a dynamic major
blktap currently uses a hardcoded major of 254 for the device.  This is
not robust in anyway and needs to be dynamic.

Note: it is better not to have the daemon create the node, and have udev
create it instead. But since the daemon currently creates the node
anyway, it is still the way this is done.  That change needs to be made
at another time.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
19 years ago[BLKTAP][XEND] Fix blktap to work with a bootloader
Andrew Warfield [Thu, 28 Sep 2006 19:12:59 +0000 (12:12 -0700)]
[BLKTAP][XEND] Fix blktap to work with a bootloader
If a Xen guest has a bootloader configured, then it will fail to start
on a blktap image.  The problem is blkdev_uname_to_file, which cannot
parse the "tap:aio:$filename" image strings: it tries to split the
string apart at ":" and assign the result to a 2-tuple, and this
results in a python error if the split results in three or more
strings.

The fix is to split only at the first ":", and then to split again
if we detect "tap:" as the image type.

Signed-off-by: Stephen Tweedie <sct@redhat.com>
19 years ago[BLKTAP] Fix SMP debugging assert failures in blktap
Andrew Warfield [Thu, 28 Sep 2006 19:03:01 +0000 (12:03 -0700)]
[BLKTAP] Fix SMP debugging assert failures in blktap
blktap is calling non-atomic kernel functions with irqs disabled, which
hits various kernel debug traps if those are enabled.  The problem is
req_increase(), which takes the pending_free_lock.

This function is currently only ever called from module initialiation,
where it is impossible for it to race against anything else.  Its
companion, req_decrease(), is not called at all.

Fix by removing the offending locking from req_increase() and, while
we're at it, remove req_decrease() entirely.

Signed-off-by: Stephen Tweedie <sct@redhat.com>
19 years ago[BLKTAP] clean up blktap and remove private structure
Andrew Warfield [Thu, 28 Sep 2006 18:52:17 +0000 (11:52 -0700)]
[BLKTAP] clean up blktap and remove private structure
This patch cleans up the blktap.c code to make it form to the Linux
coding style a little better.

It also removes the private data structure that is only used to store
the index of the tabfds descriptor.  Instead the filp->private_data now
points to the descriptor itself.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
19 years ago[BLKTAP] Fix blktap oops on domain shutdown
Andrew Warfield [Thu, 28 Sep 2006 18:41:23 +0000 (11:41 -0700)]
[BLKTAP] Fix blktap oops on domain shutdown
When a domain shuts down with a blktap-backed block device open, it can
easily cause a dom0 oops.  The XenbusStateClosing event can occur while
the tapdisk userland thread is still processing IO requests (eg.
readaheads) from the domU.  But the xenbus state handler calls
tap_blkif_unmap(), unmapping the blkif->blk_ring.sring rin buffer, so
when the tapdisk thread next calls the BLKTAP_IOCTL_KICK_FE to return
the completion event to the FE via that ring buffer, it oopses.

This can be fixed simply by not calling tap_blkif_unmap() in this case;
the ring buffer will still be unmapped later on when the blkif is
destroyed by blktap_remove(), only then it will properly wait for the
blkif refcnt to reach zero before doing so.

Signed-off-by: Stephen Tweedie <sct@redhat.com>
19 years ago[XEN] Support lightweight shadow-translate PV guests, for paravirt-ops.
Tim Deegan [Thu, 28 Sep 2006 16:10:54 +0000 (17:10 +0100)]
[XEN] Support lightweight shadow-translate PV guests, for paravirt-ops.
This is a modified subset of Michael Fetterman's shadow-translate work.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
19 years ago[XEN] Fix interaction between tlbflush timestamp and shadow flags
Tim Deegan [Thu, 28 Sep 2006 16:09:11 +0000 (17:09 +0100)]
[XEN] Fix interaction between tlbflush timestamp and shadow flags
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
19 years ago[NET] back: 4 loopbacks by default for dom0 (previously was 8).
kfraser@localhost.localdomain [Thu, 28 Sep 2006 12:45:49 +0000 (13:45 +0100)]
[NET] back: 4 loopbacks by default for dom0 (previously was 8).
Signed-off-by: Keir Fraser <keir@xensource.com>